home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / NetPokerForMacOSX_Server / HoldEmHigh / HoldEmHighHand.m < prev    next >
Encoding:
Text File  |  1999-06-25  |  565 b   |  29 lines

  1. #import "poker.h"
  2.  
  3. @implementation HoldEmHighHand
  4.  
  5. - (id)init {
  6.     int i;
  7.     self = [super init];
  8.     cards = [[NSMutableArray allocWithZone:[self zone]] init];
  9.     for (i = 0; i < 5; i++)
  10.       [cards addObject: [[Card allocWithZone:[self zone]] init]];
  11.     return self;
  12. }
  13.  
  14. - (void)dealloc {
  15.    [cards release];
  16.    [super dealloc];
  17. }
  18.  
  19. - (NSArray *)cards {
  20.     return cards;
  21. }
  22.  
  23. - (void)setCard:(Card *)card atIndex:(int)index {
  24.    Card *oldCard = [cards objectAtIndex:index];
  25.     [cards replaceObjectAtIndex:index withObject:card];
  26.   // [oldCard release];
  27. }
  28.  
  29. @end